#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QWidget>
#include <QListWidget>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QGridLayout>
#include <QTcpServer>
#include <QTcpSocket>

#include "tcpserver.h"

class mainWidget : public QWidget
{
    Q_OBJECT

public:
    mainWidget(QWidget *parent = 0);
    ~mainWidget();

public slots:
    void slotCreateServer();
    void slotQuit();
    void slotClose();
    void updateServer(QString, int);

private:
    int         port;
    TcpServer   *server;

    QListWidget *ContentListWidegt;
    QLabel      *PortLabel;
    QLineEdit   *PortLineEdit;
    QPushButton *CreateBtn;
    QPushButton *QuitBtn;
    QPushButton *CloseBtn;
    QGridLayout *mainLayout;

};
#endif // MAINWIDGET_H
